{% extends 'base.html' %}
{% load adminmedia %}

{% block extra_js %}
    <script type="text/javascript">
window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
</script>
{% endblock %}

{% block content%}
    <div class="grid_8">
<form enctype="multipart/form-data" action="" method="post"><div id="csrf_token">{% csrf_token %}</div>
    <table class="tabl_rep color1">
        {{ form.media }}
        <tr><td><strong>Дата начала:</strong></td><td>{{ form.start }}</td></tr>
        <tr><td><strong>Дата окончания:</strong></td><td>{{ form.end }}</td></tr>
        <tr><td><strong>Праздничный:</strong></td><td>{{ form.is_holiday }}</td></tr>
        <tr><td><strong>Разрешить доступ:</strong></td><td>{{ form.give_access }}</td></tr>
    <tr>
        <td colspan="2"><input value="Создать" type="submit"></td>
    </tr>
    </table>
</form>
    </div>
    <div class="grid_4">
    {% if form.start.errors %}
        <strong>Ошибки в поле "Дата начала":</strong><strong class="error">{{ form.start.errors }}</strong>
    {% endif %}
    {% if form.end.errors %}
        <strong>Ошибки в поле "Дата окончания":</strong><strong class="error">{{ form.end.errors }}</strong>
    {% endif %}
    {% if form.non_field_errors %}
        <strong>Ошибки:</strong><strong class="error">{{ form.non_field_errors }}</strong>
    {% endif %}
   

    </div>
{% endblock %}